<style type="text/css">
a {
	cursor: pointer;
}
.site .btn-group .dropdown-toggle {
	min-width: 180px;
	text-align: left;
}
.memo-status .btn-group {
	margin-left: 10px;
}
</style>
<style type="text/css">
.timeline {
    border-collapse: collapse;
    border-spacing: 0;
    display: table;
    position: relative;
    table-layout: fixed;
    width: 100%;
    margin-bottom: 50px;
}

.timeline .time-show {
    margin-right: -75px;
    margin-top: 30px;
    position: relative;
    margin-bottom: 30px;
}

.time-show .btn {
    width: 150px;
}

.timeline .time-show a {
    color: #fff;
}

.timeline:before {
    background-color: #d8d9df;
    bottom: 0px;
    content: "";
    left: 50%;
    position: absolute;
    top: 30px;
    width: 1px;
    z-index: 0;
}

h3.timeline-title {
    margin: 0;
    color: #C8CCD7;
    font-size: 20px;
    font-weight: 400;
    margin: 0 0 5px;
    text-transform: uppercase;
}

.t-info {
    color: #C8CCD7;
}

.timeline-item:before, .timeline-item.alt:after {
    content: "";
    display: block;
    width: 50%;
}

.timeline-item {
    display: table-row;
}

.timeline-desk {
    display: table-cell;
    vertical-align: top;
    width: 50%;
}

.timeline-desk h1 {
    font-size: 16px;
    font-weight: 300;
    margin: 0 0 5px;
}

.timeline-desk .panel {
    display: block;
    margin-left: 45px;
    position: relative;
    text-align: left;
    background: #fff;
}

.timeline-item .timeline-desk .arrow {
    border-bottom: 8px solid transparent;
    border-top: 8px solid transparent;
    display: block;
    height: 0;
    left: -7px;
    position: absolute;
    top: 50%;
    margin-top: -10px;
    width: 0;
}

.timeline-item .timeline-desk .arrow {
    border-right: 8px solid #fff !important;
}

.timeline-item.alt .timeline-desk .arrow-alt {
    border-bottom: 8px solid transparent;
    border-top: 8px solid transparent;
    display: block;
    height: 0;
    right: -7px;
    position: absolute;
    top: 50%;
    margin-top: -10px;
    width: 0;
    left: auto;
}

.timeline-item.alt .timeline-desk .arrow-alt {
    border-left: 8px solid #fff !important;
}

.timeline .timeline-icon {
    left: -54px;
    position: absolute;
    top: 50%;
    margin-top: -10px;
}

.timeline .timeline-icon {
    background: #fff;
    border: 1px solid #D8D9DF
}

.timeline-desk span a {
    text-transform: uppercase;
}

.timeline-desk h1.red, .timeline-desk span a.red {
    color: #EF6F66;
}

.timeline-desk h1.green, .timeline-desk span a.green {
    color: #39B6AE;
}

.timeline-desk h1.blue, .timeline-desk span a.blue {
    color: #56C9F5;
}

.timeline-desk h1.purple, .timeline-desk span a.purple {
    color: #8074C6;
}

.timeline-desk h1.light-green, .timeline-desk span a.light-green {
    color: #A8D76F;
}

.timeline-desk h1.yellow, .timeline-desk span a.yellow {
    color: #fed65a;
}

.timeline .timeline-icon {
    border-radius: 50%;
    -webkit-border-radius: 50%;
    display: block;
    height: 20px;
    width: 20px;
    text-align: center;
    color: #fff;
}

.timeline .timeline-icon i {
    margin-top: 9px;
}

.timeline-item.alt .timeline-icon {
    left: auto;
    right: -56px;
}

.timeline .time-icon:before {
    font-size: 16px;
    margin-top: 5px;
}

.timeline .timeline-date {
    left: -245px;
    position: absolute;
    text-align: right;
    top: 12px;
    width: 150px;
    display: none;
}

.timeline-item.alt .timeline-date {
    left: auto;
    right: -245px;
    text-align: left;
    display: none;
}

.timeline-desk h5 span {
    color: #999999;
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
}

.timeline-item.alt:before {
    display: none;
}

.timeline-item:before, .timeline-item.alt:after {
    content: "";
    display: block;
    width: 50%;
}

.timeline-desk p {
    font-size: 14px;
    margin-bottom: 0;
    color: #999;
}

.timeline-desk a {
    color: #1fb5ad;
}

.timeline-desk .panel {
    margin-bottom: 5px;
}

.timeline-desk .album {
    margin-top: 20px;
}

.timeline-item.alt .timeline-desk .album {
    margin-top: 20px;
    float: right;
}

.timeline-desk .album a {
    margin-right: 5px;
    float: left;
}

.timeline-item.alt .timeline-desk .album a {
    margin-left: 5px;
    float: right;
}

.timeline-desk .notification {
    background: none repeat scroll 0 0 #FFFFFF;
    margin-top: 20px;
    padding: 8px;
}

.timeline-item.alt .panel {
    margin-left: 0;
    margin-right: 45px;
}

.mbot30 {
    margin-bottom: 30px;
}

.timeline-item.alt h1, .timeline-item.alt p {
    text-align: right;
}

</style>
<div class="pageheader">
	<h2>
		<i class="fa fa-sitemap"></i>日志管理
	</h2>
	<div class="breadcrumb-wrapper">
		<span class="label">你所在的位置：</span>
		<ol class="breadcrumb">
			<li><a href="/index">ERP管理系统</a></li>
			<li>日志管理</li>
			<li>网站订单日志</li>
			<li class="active">订单备注</li>
		</ol>
	</div>
</div>
<div class="contentpanel">
    <div class="main">
    <form action="/log/omemo" method="post" class="form-horizontal">
        <div class="timeline">
            <?php if ($this->memolist){?>
			<article class="timeline-item alt">
				<div class="text-right">
					<div class="time-show first">
						<a class="btn btn-warning">备注时间轴</a>
					</div>
				</div>
			</article>
            <?php 
            $i = 0;
            foreach ($this->memolist as $v){
            	$i++;
            ?>
			<article class="timeline-item <?php echo $i%2?'alt':'';?>">
				<div class="timeline-desk">
					<div class="panel">
						<div class="panel-body">
							<span class="<?php echo $i%2?'arrow-alt':'arrow';?>"></span> <span class="timeline-icon"></span>
							<h1 class="red"><?php echo $v['add_time'] . '    ' . $v['add_user'];?></h1>
							<div><?php echo $v['memo'];?></div>
						</div>
					</div>
				</div>
			</article>
			<?php } }?>
		</div>
        <?php $loglist = $this->loglist; ?>
        <div class="form-group form-inline">
            <label for="Orderid" class="col-sm-2 control-label">订单号：</label>
            <div class="col-sm-10">
                <input type="text" readonly="readonly" class="form-control" size="100" name="oid" value="<?php echo $this->oid; ?>">
            </div>
        </div>
        <div class="form-group form-inline">
            <label for="Site" class="col-sm-2 control-label">网站：</label>
            <div class="col-sm-10">
                <input type="text" readonly="readonly" class="form-control" size="100" name="site" value="<?php echo $this->site; ?>">
            </div>
        </div>
        <div class="form-group form-inline">
            <label for="Memo" class="col-sm-2 control-label">备注：</label>
            <div class="col-sm-10">
                <textarea rows="3" cols="97" class="form-control" name="memo"><?php echo $loglist[0]['memo']; ?></textarea>
            </div>
        </div>
        <?php if($loglist[0]['is_memo']){ ?>
        <div class="form-group memo-status">
            <label for="MemoStatus" class="col-sm-2 control-label">已阅：</label>
            <div class="btn-group">
                <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                    <?php if($loglist[0]['is_memo'] == 1) {?>
                    <span class="text">未阅 </span>
                    <?php }else{ ?>
                    <span class="text">已阅 </span>
                    <?php } ?>
                </button>
                <input type="hidden" value="0" name="is_memo">
                <ul class="dropdown-menu">
                    <li><a data-id="1">未阅</a></li>
                    <li><a data-id="2">已阅</a></li>
               </ul>
            </div>
        </div>
        <?php }?>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary">确定</button>
            </div>
        </div>
    </form>
    </div>
</div>
<script type="text/javascript">
$(document).ready(function(){
	 $(".memo-status li a").click(function(){
	     $(".memo-status .text").text($(this).text());
	     $(".memo-status input").val($(this).data('id'));
     });
});
</script>